Event.observe( window, 'keypress', keypressHandler, false );

function keypressHandler( event ) {
        var key = event.which || event.keyCode;

        var element = Event.element( event );

        switch (key) {
			case Event.KEY_RETURN:
				if( element.className == 'tagEditNameContainer' ) {
					var id = element.getAttribute( 'for' );
					$('tagEditSave'+id).onclick();
				}
				break;
        }
}


function actionMessage( message )
{
	if( $('actionMessage') ){
	
		$('actionMessage').innerHTML = message;
		Element.show( 'actionMessage' );
		new Effect.Appear( 'actionMessage' );
		new Effect.Fade( 'actionMessage', {duration: 2, queue: 'end'} );
	
	} else {
		alert( message );
	}
}